#include "syscall.h"

int main(int argc, char **argv){
    char fname[] = "create_test.txt";
    char text[] = "I am a little teapot\n";

    Write("Here in program-----\n",21,ConsoleOutput);
    Create(fname);

    OpenFileId f = Open(fname);
    Write(text, 21, f);
    Close(f);


   
    OpenFileId f2 = Open(fname);
    char text2[21];
    Read(text2, 21, f2);
    Close(f2);
    
    Write(text2, 21, ConsoleOutput);

    char read[20];
    int numBytes = Read(read, 20, ConsoleInput);
    Write("Read this:\n", 11, ConsoleOutput);
    Write(read, numBytes, ConsoleOutput);
}
